<?php

namespace App\Enums;

use App\Traits\EnumTrait;

class MemberLevelConfigClientEnum
{

    use EnumTrait;

    const ANDROID = ['code' => 'ANDROID'];
    const IOS = ['code' => 'IOS'];
    const WECHAT_MINI_APP = ['code' => 'WECHAT_MINI_APP'];

    public static function getEnumByCode($code)
    {
        foreach (self::getConstants() as $constant) {
            if ($constant['code'] == $code) {
                return $constant;
            }
        }
        return null;
    }
}
